↳ Prolog
↳ PrologToPiTRSProof
queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)
QUEENS_IN_A(Y) → U1_A(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
QUEENS_IN_A(Y) → PERM_IN_GA(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)
PERM_IN_GA(.(X, Y), .(V, Res)) → U3_GA(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
PERM_IN_GA(.(X, Y), .(V, Res)) → DELETE_IN_AGA(V, .(X, Y), Rest)
DELETE_IN_AGA(X, .(F, T), .(F, R)) → U5_AGA(X, F, T, R, delete_in_aga(X, T, R))
DELETE_IN_AGA(X, .(F, T), .(F, R)) → DELETE_IN_AGA(X, T, R)
U3_GA(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_GA(X, Y, V, Res, perm_in_ga(Rest, Res))
U3_GA(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → PERM_IN_GA(Rest, Res)
U1_A(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_A(Y, safe_in_g(Y))
U1_A(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → SAFE_IN_G(Y)
SAFE_IN_G(.(X, Y)) → U6_G(X, Y, noattack_in_ggg(X, Y, s(0)))
SAFE_IN_G(.(X, Y)) → NOATTACK_IN_GGG(X, Y, s(0))
NOATTACK_IN_GGG(X, .(F, T), N) → U8_GGG(X, F, T, N, notEq_in_gg(X, F))
NOATTACK_IN_GGG(X, .(F, T), N) → NOTEQ_IN_GG(X, F)
NOTEQ_IN_GG(s(X), s(Y)) → U15_GG(X, Y, notEq_in_gg(X, Y))
NOTEQ_IN_GG(s(X), s(Y)) → NOTEQ_IN_GG(X, Y)
U8_GGG(X, F, T, N, notEq_out_gg(X, F)) → U9_GGG(X, F, T, N, add_in_gga(F, N, FplusN))
U8_GGG(X, F, T, N, notEq_out_gg(X, F)) → ADD_IN_GGA(F, N, FplusN)
ADD_IN_GGA(s(X), Y, s(Z)) → U14_GGA(X, Y, Z, add_in_gga(X, Y, Z))
ADD_IN_GGA(s(X), Y, s(Z)) → ADD_IN_GGA(X, Y, Z)
U9_GGG(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_GGG(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U9_GGG(X, F, T, N, add_out_gga(F, N, FplusN)) → NOTEQ_IN_GG(X, FplusN)
U10_GGG(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_GGG(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U10_GGG(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → ADD_IN_GGA(X, N, XplusN)
U11_GGG(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_GGG(X, F, T, N, notEq_in_gg(F, XplusN))
U11_GGG(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → NOTEQ_IN_GG(F, XplusN)
U12_GGG(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_GGG(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U12_GGG(X, F, T, N, notEq_out_gg(F, XplusN)) → NOATTACK_IN_GGG(X, T, s(N))
U6_G(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_G(X, Y, safe_in_g(Y))
U6_G(X, Y, noattack_out_ggg(X, Y, s(0))) → SAFE_IN_G(Y)
queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
QUEENS_IN_A(Y) → U1_A(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
QUEENS_IN_A(Y) → PERM_IN_GA(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)
PERM_IN_GA(.(X, Y), .(V, Res)) → U3_GA(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
PERM_IN_GA(.(X, Y), .(V, Res)) → DELETE_IN_AGA(V, .(X, Y), Rest)
DELETE_IN_AGA(X, .(F, T), .(F, R)) → U5_AGA(X, F, T, R, delete_in_aga(X, T, R))
DELETE_IN_AGA(X, .(F, T), .(F, R)) → DELETE_IN_AGA(X, T, R)
U3_GA(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_GA(X, Y, V, Res, perm_in_ga(Rest, Res))
U3_GA(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → PERM_IN_GA(Rest, Res)
U1_A(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_A(Y, safe_in_g(Y))
U1_A(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → SAFE_IN_G(Y)
SAFE_IN_G(.(X, Y)) → U6_G(X, Y, noattack_in_ggg(X, Y, s(0)))
SAFE_IN_G(.(X, Y)) → NOATTACK_IN_GGG(X, Y, s(0))
NOATTACK_IN_GGG(X, .(F, T), N) → U8_GGG(X, F, T, N, notEq_in_gg(X, F))
NOATTACK_IN_GGG(X, .(F, T), N) → NOTEQ_IN_GG(X, F)
NOTEQ_IN_GG(s(X), s(Y)) → U15_GG(X, Y, notEq_in_gg(X, Y))
NOTEQ_IN_GG(s(X), s(Y)) → NOTEQ_IN_GG(X, Y)
U8_GGG(X, F, T, N, notEq_out_gg(X, F)) → U9_GGG(X, F, T, N, add_in_gga(F, N, FplusN))
U8_GGG(X, F, T, N, notEq_out_gg(X, F)) → ADD_IN_GGA(F, N, FplusN)
ADD_IN_GGA(s(X), Y, s(Z)) → U14_GGA(X, Y, Z, add_in_gga(X, Y, Z))
ADD_IN_GGA(s(X), Y, s(Z)) → ADD_IN_GGA(X, Y, Z)
U9_GGG(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_GGG(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U9_GGG(X, F, T, N, add_out_gga(F, N, FplusN)) → NOTEQ_IN_GG(X, FplusN)
U10_GGG(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_GGG(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U10_GGG(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → ADD_IN_GGA(X, N, XplusN)
U11_GGG(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_GGG(X, F, T, N, notEq_in_gg(F, XplusN))
U11_GGG(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → NOTEQ_IN_GG(F, XplusN)
U12_GGG(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_GGG(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U12_GGG(X, F, T, N, notEq_out_gg(F, XplusN)) → NOATTACK_IN_GGG(X, T, s(N))
U6_G(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_G(X, Y, safe_in_g(Y))
U6_G(X, Y, noattack_out_ggg(X, Y, s(0))) → SAFE_IN_G(Y)
queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
ADD_IN_GGA(s(X), Y, s(Z)) → ADD_IN_GGA(X, Y, Z)
queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
ADD_IN_GGA(s(X), Y, s(Z)) → ADD_IN_GGA(X, Y, Z)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
ADD_IN_GGA(s(X), Y) → ADD_IN_GGA(X, Y)
From the DPs we obtained the following set of size-change graphs:
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
NOTEQ_IN_GG(s(X), s(Y)) → NOTEQ_IN_GG(X, Y)
queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
NOTEQ_IN_GG(s(X), s(Y)) → NOTEQ_IN_GG(X, Y)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
NOTEQ_IN_GG(s(X), s(Y)) → NOTEQ_IN_GG(X, Y)
From the DPs we obtained the following set of size-change graphs:
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
↳ PiDP
U11_GGG(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_GGG(X, F, T, N, notEq_in_gg(F, XplusN))
U8_GGG(X, F, T, N, notEq_out_gg(X, F)) → U9_GGG(X, F, T, N, add_in_gga(F, N, FplusN))
NOATTACK_IN_GGG(X, .(F, T), N) → U8_GGG(X, F, T, N, notEq_in_gg(X, F))
U12_GGG(X, F, T, N, notEq_out_gg(F, XplusN)) → NOATTACK_IN_GGG(X, T, s(N))
U10_GGG(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_GGG(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U9_GGG(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_GGG(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PiDP
↳ PiDP
U11_GGG(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_GGG(X, F, T, N, notEq_in_gg(F, XplusN))
U8_GGG(X, F, T, N, notEq_out_gg(X, F)) → U9_GGG(X, F, T, N, add_in_gga(F, N, FplusN))
NOATTACK_IN_GGG(X, .(F, T), N) → U8_GGG(X, F, T, N, notEq_in_gg(X, F))
U12_GGG(X, F, T, N, notEq_out_gg(F, XplusN)) → NOATTACK_IN_GGG(X, T, s(N))
U10_GGG(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_GGG(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U9_GGG(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_GGG(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
↳ PiDP
↳ PiDP
U12_GGG(X, T, N, notEq_out_gg) → NOATTACK_IN_GGG(X, T, s(N))
U11_GGG(X, F, T, N, add_out_gga(XplusN)) → U12_GGG(X, T, N, notEq_in_gg(F, XplusN))
NOATTACK_IN_GGG(X, .(F, T), N) → U8_GGG(X, F, T, N, notEq_in_gg(X, F))
U8_GGG(X, F, T, N, notEq_out_gg) → U9_GGG(X, F, T, N, add_in_gga(F, N))
U9_GGG(X, F, T, N, add_out_gga(FplusN)) → U10_GGG(X, F, T, N, notEq_in_gg(X, FplusN))
U10_GGG(X, F, T, N, notEq_out_gg) → U11_GGG(X, F, T, N, add_in_gga(X, N))
notEq_in_gg(0, s(X)) → notEq_out_gg
notEq_in_gg(s(X), 0) → notEq_out_gg
notEq_in_gg(s(X), s(Y)) → U15_gg(notEq_in_gg(X, Y))
add_in_gga(0, X) → add_out_gga(X)
add_in_gga(s(X), Y) → U14_gga(add_in_gga(X, Y))
U15_gg(notEq_out_gg) → notEq_out_gg
U14_gga(add_out_gga(Z)) → add_out_gga(s(Z))
notEq_in_gg(x0, x1)
add_in_gga(x0, x1)
U15_gg(x0)
U14_gga(x0)
From the DPs we obtained the following set of size-change graphs:
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
U6_G(X, Y, noattack_out_ggg(X, Y, s(0))) → SAFE_IN_G(Y)
SAFE_IN_G(.(X, Y)) → U6_G(X, Y, noattack_in_ggg(X, Y, s(0)))
queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PiDP
U6_G(X, Y, noattack_out_ggg(X, Y, s(0))) → SAFE_IN_G(Y)
SAFE_IN_G(.(X, Y)) → U6_G(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
↳ PiDP
SAFE_IN_G(.(X, Y)) → U6_G(Y, noattack_in_ggg(X, Y, s(0)))
U6_G(Y, noattack_out_ggg) → SAFE_IN_G(Y)
noattack_in_ggg(X, [], N) → noattack_out_ggg
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
U8_ggg(X, F, T, N, notEq_out_gg) → U9_ggg(X, F, T, N, add_in_gga(F, N))
notEq_in_gg(0, s(X)) → notEq_out_gg
notEq_in_gg(s(X), 0) → notEq_out_gg
notEq_in_gg(s(X), s(Y)) → U15_gg(notEq_in_gg(X, Y))
U9_ggg(X, F, T, N, add_out_gga(FplusN)) → U10_ggg(X, F, T, N, notEq_in_gg(X, FplusN))
U15_gg(notEq_out_gg) → notEq_out_gg
add_in_gga(0, X) → add_out_gga(X)
add_in_gga(s(X), Y) → U14_gga(add_in_gga(X, Y))
U10_ggg(X, F, T, N, notEq_out_gg) → U11_ggg(X, F, T, N, add_in_gga(X, N))
U14_gga(add_out_gga(Z)) → add_out_gga(s(Z))
U11_ggg(X, F, T, N, add_out_gga(XplusN)) → U12_ggg(X, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, T, N, notEq_out_gg) → U13_ggg(noattack_in_ggg(X, T, s(N)))
U13_ggg(noattack_out_ggg) → noattack_out_ggg
noattack_in_ggg(x0, x1, x2)
U8_ggg(x0, x1, x2, x3, x4)
notEq_in_gg(x0, x1)
U9_ggg(x0, x1, x2, x3, x4)
U15_gg(x0)
add_in_gga(x0, x1)
U10_ggg(x0, x1, x2, x3, x4)
U14_gga(x0)
U11_ggg(x0, x1, x2, x3, x4)
U12_ggg(x0, x1, x2, x3)
U13_ggg(x0)
From the DPs we obtained the following set of size-change graphs:
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
DELETE_IN_AGA(X, .(F, T), .(F, R)) → DELETE_IN_AGA(X, T, R)
queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
DELETE_IN_AGA(X, .(F, T), .(F, R)) → DELETE_IN_AGA(X, T, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
DELETE_IN_AGA(.(F, T)) → DELETE_IN_AGA(T)
From the DPs we obtained the following set of size-change graphs:
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
U3_GA(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → PERM_IN_GA(Rest, Res)
PERM_IN_GA(.(X, Y), .(V, Res)) → U3_GA(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
U3_GA(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → PERM_IN_GA(Rest, Res)
PERM_IN_GA(.(X, Y), .(V, Res)) → U3_GA(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ RuleRemovalProof
PERM_IN_GA(.(X, Y)) → U3_GA(delete_in_aga(.(X, Y)))
U3_GA(delete_out_aga(V, Rest)) → PERM_IN_GA(Rest)
delete_in_aga(.(X, Y)) → delete_out_aga(X, Y)
delete_in_aga(.(F, T)) → U5_aga(F, delete_in_aga(T))
U5_aga(F, delete_out_aga(X, R)) → delete_out_aga(X, .(F, R))
delete_in_aga(x0)
U5_aga(x0, x1)
delete_in_aga(.(X, Y)) → delete_out_aga(X, Y)
POL(.(x1, x2)) = 1 + x1 + 2·x2
POL(PERM_IN_GA(x1)) = 2·x1
POL(U3_GA(x1)) = 2·x1
POL(U5_aga(x1, x2)) = 1 + x1 + 2·x2
POL(delete_in_aga(x1)) = x1
POL(delete_out_aga(x1, x2)) = x1 + x2
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ RuleRemovalProof
↳ QDP
↳ RuleRemovalProof
PERM_IN_GA(.(X, Y)) → U3_GA(delete_in_aga(.(X, Y)))
U3_GA(delete_out_aga(V, Rest)) → PERM_IN_GA(Rest)
delete_in_aga(.(F, T)) → U5_aga(F, delete_in_aga(T))
U5_aga(F, delete_out_aga(X, R)) → delete_out_aga(X, .(F, R))
delete_in_aga(x0)
U5_aga(x0, x1)
U3_GA(delete_out_aga(V, Rest)) → PERM_IN_GA(Rest)
POL(.(x1, x2)) = x1 + x2
POL(PERM_IN_GA(x1)) = 2·x1
POL(U3_GA(x1)) = x1
POL(U5_aga(x1, x2)) = 2·x1 + x2
POL(delete_in_aga(x1)) = 2·x1
POL(delete_out_aga(x1, x2)) = 2 + x1 + 2·x2
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ RuleRemovalProof
↳ QDP
↳ RuleRemovalProof
↳ QDP
↳ DependencyGraphProof
PERM_IN_GA(.(X, Y)) → U3_GA(delete_in_aga(.(X, Y)))
delete_in_aga(.(F, T)) → U5_aga(F, delete_in_aga(T))
U5_aga(F, delete_out_aga(X, R)) → delete_out_aga(X, .(F, R))
delete_in_aga(x0)
U5_aga(x0, x1)